﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Perceiveit.Xml;

namespace Perceiveit.Xml.Tests.Concrete
{
    public class LocalString : XEntity
    {
        private static int _nextIndex = 1;
        private int _index;

        private static XProperty<string> _invar = XProperty.Attribute<string>("invariant");
        private static XProperty<string> _local = XProperty.Text<string>();

        public LocalString()
        {
            _index = _nextIndex++;
        }


        public string Invariant
        {
            get { return _invar.GetValue(this); }
            set 
            {
                _invar.SetValue(this, value);
            }
        }

        public string Localized
        {
            get { return _local.GetValue(this); }
            set 
            {
                _local.SetValue(this, value);
            }
        }
        
    }
}
